Urban Index · Day & Night Fusion

NDUI – Normalized Difference Urban Index

NDUI combines nighttime lights (NTL) with NDVI to enhance urban areas and separate them from bare soil, vegetation and deserts. It is especially useful for global and regional urbanization studies.

1. Scientific Definition

The Normalized Difference Urban Index (NDUI) is a spectral index that merges nighttime light intensity with vegetation information to highlight built-up areas and reduce confusion with bare land and rural settlements.

Formula

NDUI = (NTL − NDVI) / (NTL + NDVI) Range: −1 → +1

  • NTL – normalized NightTime Light value (DMSP-OLS or VIIRS)
  • NDVI – Normalized Difference Vegetation Index

Typical Interpretation

NDUIMeaning
< 0Non-urban: vegetation, water, dark areas
0 – 0.2Low-density / peri-urban / small settlements
0.2 – 0.4Moderate urban / suburban
> 0.4Dense bright urban core

Main Applications

  • Global and regional urban extent mapping
  • Monitoring urban expansion in dry and desert regions
  • Separating bright urban core from bare land
  • Input to urban climate and exposure models

2. Data & Inputs

Nighttime Lights (NTL)

  • DMSP-OLS stable lights (historical, 1990s–2013)
  • VIIRS DNB monthly or annual composites (2012–present)
  • Values are usually scaled and then normalized to 0–1.

NDVI (from Optical Sensors)

Sentinel-2 example:

  • Red: B4
  • NIR: B8

Landsat 8 / 9 equivalent:

  • Red: B4
  • NIR: B5

Best Practices

  • Use cloud/shadow-free NDVI composites (median or max NDVI).
  • Normalize NTL to [0, 1] using min–max or histogram-based scaling.
  • Mask water with NDVI < 0 to avoid strong NTL over water.
  • Combine NDUI with NDBI / IBI for detailed urban analysis.

Suggested Palette

[ "#050816", "#172033", "#243b5a", "#3b6ba6", "#6baed6", "#e5f4ff" ]

3. Google Earth Engine Code – NDUI (NTL & NDVI)

// NDUI – Normalized Difference Urban Index
// NDUI = (NTL - NDVI) / (NTL + NDVI)
// Example: Sentinel-2 NDVI + VIIRS Nighttime Lights

var roi = geometry;   // Draw AOI as 'geometry'
Map.centerObject(roi, 8);

// 1. Sentinel-2 surface reflectance for NDVI
var s2 = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterBounds(roi)
  .filterDate("2023-01-01", "2023-12-31")
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20))
  .select(["B4","B8"]); // Red, NIR

var s2Median = s2.median().clip(roi);

// NDVI = (NIR - Red) / (NIR + Red)
var ndvi = s2Median.normalizedDifference(["B8","B4"]).rename("NDVI");

// Optional: mask water (NDVI < 0)
var ndviMasked = ndvi.updateMask(ndvi.gte(0));

// 2. VIIRS Nighttime Lights (monthly composite)
var viirs = ee.ImageCollection("NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG")
  .filterDate("2023-01-01","2023-12-31")
  .select("avg_rad")
  .mean()
  .clip(roi);

// Normalize NTL to 0–1
// Adjust 0 and 60 according to your region if needed
var ntlNorm = viirs.unitScale(0, 60).clamp(0, 1).rename("NTL_norm");

// 3. Compute NDUI = (NTL - NDVI) / (NTL + NDVI)
var ndui = ee.Image().expression(
  "(N - V) / (N + V)",
  {
    "N": ntlNorm,     // normalized NTL
    "V": ndviMasked   // NDVI (water masked)
  }
).rename("NDUI");

// 4. Visualization
var vis = {
  min: -1,
  max: 1,
  palette: ["#050816","#172033","#243b5a","#3b6ba6","#6baed6","#e5f4ff"]
};

Map.addLayer(ndui, vis, "NDUI (NTL & NDVI)");

// Optional: built-up mask, e.g. NDUI > 0.2
var builtup = ndui.gt(0.2).selfMask();
Map.addLayer(builtup, {palette:["#ffcc00"]}, "Built-up Mask (NDUI > 0.2)", false);

// 5. Export NDUI as GeoTIFF
Export.image.toDrive({
  image: ndui,
  description: "NDUI_Export",
  fileNamePrefix: "NDUI_NTL_NDVI",
  region: roi,
  scale: 30,        // match Sentinel-2 or target resolution
  crs: "EPSG:4326",
  maxPixels: 1e13
});